// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package v1alpha1

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// InterCPEnvoyAdminForwardServiceClient is the client API for InterCPEnvoyAdminForwardService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type InterCPEnvoyAdminForwardServiceClient interface {
	XDSConfig(ctx context.Context, in *XDSConfigRequest, opts ...grpc.CallOption) (*XDSConfigResponse, error)
	Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)
	Clusters(ctx context.Context, in *ClustersRequest, opts ...grpc.CallOption) (*ClustersResponse, error)
}

type interCPEnvoyAdminForwardServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewInterCPEnvoyAdminForwardServiceClient(cc grpc.ClientConnInterface) InterCPEnvoyAdminForwardServiceClient {
	return &interCPEnvoyAdminForwardServiceClient{cc}
}

func (c *interCPEnvoyAdminForwardServiceClient) XDSConfig(ctx context.Context, in *XDSConfigRequest, opts ...grpc.CallOption) (*XDSConfigResponse, error) {
	out := new(XDSConfigResponse)
	err := c.cc.Invoke(ctx, "/kuma.mesh.v1alpha1.InterCPEnvoyAdminForwardService/XDSConfig", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *interCPEnvoyAdminForwardServiceClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error) {
	out := new(StatsResponse)
	err := c.cc.Invoke(ctx, "/kuma.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Stats", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *interCPEnvoyAdminForwardServiceClient) Clusters(ctx context.Context, in *ClustersRequest, opts ...grpc.CallOption) (*ClustersResponse, error) {
	out := new(ClustersResponse)
	err := c.cc.Invoke(ctx, "/kuma.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Clusters", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// InterCPEnvoyAdminForwardServiceServer is the server API for InterCPEnvoyAdminForwardService service.
// All implementations must embed UnimplementedInterCPEnvoyAdminForwardServiceServer
// for forward compatibility
type InterCPEnvoyAdminForwardServiceServer interface {
	XDSConfig(context.Context, *XDSConfigRequest) (*XDSConfigResponse, error)
	Stats(context.Context, *StatsRequest) (*StatsResponse, error)
	Clusters(context.Context, *ClustersRequest) (*ClustersResponse, error)
	mustEmbedUnimplementedInterCPEnvoyAdminForwardServiceServer()
}

// UnimplementedInterCPEnvoyAdminForwardServiceServer must be embedded to have forward compatible implementations.
type UnimplementedInterCPEnvoyAdminForwardServiceServer struct {
}

func (UnimplementedInterCPEnvoyAdminForwardServiceServer) XDSConfig(context.Context, *XDSConfigRequest) (*XDSConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method XDSConfig not implemented")
}
func (UnimplementedInterCPEnvoyAdminForwardServiceServer) Stats(context.Context, *StatsRequest) (*StatsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Stats not implemented")
}
func (UnimplementedInterCPEnvoyAdminForwardServiceServer) Clusters(context.Context, *ClustersRequest) (*ClustersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Clusters not implemented")
}
func (UnimplementedInterCPEnvoyAdminForwardServiceServer) mustEmbedUnimplementedInterCPEnvoyAdminForwardServiceServer() {
}

// UnsafeInterCPEnvoyAdminForwardServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to InterCPEnvoyAdminForwardServiceServer will
// result in compilation errors.
type UnsafeInterCPEnvoyAdminForwardServiceServer interface {
	mustEmbedUnimplementedInterCPEnvoyAdminForwardServiceServer()
}

func RegisterInterCPEnvoyAdminForwardServiceServer(s grpc.ServiceRegistrar, srv InterCPEnvoyAdminForwardServiceServer) {
	s.RegisterService(&InterCPEnvoyAdminForwardService_ServiceDesc, srv)
}

func _InterCPEnvoyAdminForwardService_XDSConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(XDSConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InterCPEnvoyAdminForwardServiceServer).XDSConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/kuma.mesh.v1alpha1.InterCPEnvoyAdminForwardService/XDSConfig",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InterCPEnvoyAdminForwardServiceServer).XDSConfig(ctx, req.(*XDSConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InterCPEnvoyAdminForwardService_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StatsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InterCPEnvoyAdminForwardServiceServer).Stats(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/kuma.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Stats",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InterCPEnvoyAdminForwardServiceServer).Stats(ctx, req.(*StatsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InterCPEnvoyAdminForwardService_Clusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ClustersRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InterCPEnvoyAdminForwardServiceServer).Clusters(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/kuma.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Clusters",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InterCPEnvoyAdminForwardServiceServer).Clusters(ctx, req.(*ClustersRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// InterCPEnvoyAdminForwardService_ServiceDesc is the grpc.ServiceDesc for InterCPEnvoyAdminForwardService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var InterCPEnvoyAdminForwardService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kuma.mesh.v1alpha1.InterCPEnvoyAdminForwardService",
	HandlerType: (*InterCPEnvoyAdminForwardServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "XDSConfig",
			Handler:    _InterCPEnvoyAdminForwardService_XDSConfig_Handler,
		},
		{
			MethodName: "Stats",
			Handler:    _InterCPEnvoyAdminForwardService_Stats_Handler,
		},
		{
			MethodName: "Clusters",
			Handler:    _InterCPEnvoyAdminForwardService_Clusters_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/mesh/v1alpha1/envoy_admin_inter_cp_forward.proto",
}
